﻿#ifndef HOTELINFO_H
#define HOTELINFO_H
#include<QString>
#include <QList>
#include <QMap>

#if _MSC_VER >= 1600
#pragma execution_character_set("utf-8")
#endif

class HotelInfo
{
public:
    HotelInfo();
    HotelInfo(QString hotelNum, QString user, QString name = "", QString location = "" ,
              QString star = "", QString type =  "", QString city = "", QString phone = "",
              int totalCount  = 0, int lowPrice = 0, int highPrice = 0,QString openedTime= "",
              QString decoratedTime= "", QString description  = "",QString cancellation = "",
              QString instruction = "", QString server = "", QString businessLicense = "",
               QString photo = "", QString state = "未审核", QString mark = "", int commentCount = 0,
              bool isSave = false);

    bool getIsSave() const;
    int getTotalHouse() const;
    int getLowPrice() const;
    int getHighPrice() const;
    int getCommentCount() const;
    const QString &getUser() const;
    const QString &getHotel() const;
    const QString &getName() const;
    const QString &getLocation() const;
    const QString &getState() const;
    const QString &getStar() const;
    const QString &getType() const;
    const QString &getMark() const;
    const QString &getCity() const;
    const QString &getPhone() const;
    const QString &getPhoto() const;
    const QString &getServer() const;
    const QString &getBusinessLicense() const;
    const QString &getDescription() const;
    const QString &getCancellation() const;
    const QString &getInstruction() const;
    const QString &getOpenedTime() const;
    const QString &getDecoratedTime() const;

    void setIsSave(bool isSave);
    void setTotalHouse(int totalHouse);
    void setLowPrice(int lowPrice);
    void setHighPrice(int highPrice);
    void setCommentCount(int count);
    void setUser(const QString& user);
    void setHotel(const QString& hotelNum);
    void setName(const QString& name);
    void setLocation(const QString& location);
    void setState(const QString& state);
    void setStar(const QString& star);
    void setType(const QString& type);
    void setMark(const QString& mark);
    void setCity(const QString& city);
    void setPhone(const QString& phone);
    void setPhoto(const QString& path);
    void setServer(const QString& server);
    void setBusinessLicense(const QString& path);
    void setDescription(const QString& description);
    void setCancellation(const QString& cancellation);
    void setInstruction(const QString& instruction);
    void setOpenedTime(const QString& openedTime);
    void setDecoratedTime(const QString& decoratedTime);

private:
    bool m_save;
    int m_totalHouse;
    int m_lowPrice;
    int m_highPrice;
    int m_commentCount;
    QString m_user;
    QString m_hotel;
    QString m_name;
    QString m_location;
    QString m_state;
    QString m_star;
    QString m_type;
    QString m_mark;                 ///float - 评分
    QString m_city;
    QString m_phone;
    QString m_photo;
    QString m_server;
    QString m_businessLicense;
    QString m_description;
    QString m_cancellation;     ///取消声明 -- 允许取消时间
    QString m_instruction;      ///说明
    QString m_openedTime;
    QString m_decoratedTime;

};

typedef QList<HotelInfo> HotelInfoList;
typedef QMap<QString, HotelInfoList::iterator> HotelInfoMap;  //网络操作使用


#endif // HOTELINFO_H
